<?php
$v_record_id_list = "";
if(isset($_REQUEST['hdn_record_id_list'])){
	$v_record_id_list = $_REQUEST['hdn_record_id_list'];
}
if(isset($_REQUEST['hdn_record_id'])){
	$v_record_id = intval($_REQUEST['hdn_record_id']);
}

$v_record_id_get = "";
if(isset($_REQUEST['hdn_record_id']) && isset($_REQUEST['hdn_query_data'])){
	$v_record_id_get = intval($_REQUEST['hdn_record_id']);
}

$v_query_data = false;
if(isset($_REQUEST['hdn_query_data'])){
	$v_query_data = true;
}

//echo $v_record_id_list;
//exit;
$v_recordtype_name = $_REQUEST['hdn_recordtype_name']; 
if(_is_sqlserver()){
	
	  $sql = "Exec Onegate_RecordGetAllForIdList ";
	  $sql = $sql ."'". $v_record_id_list."'" ;
	  $ado_conn->SetFetchMode(ADODB_FETCH_NUM);
	  $arr_all_record = $ado_conn->GetAll($sql);
	  $v_count = sizeof($arr_all_record);
	
	if ($v_query_data) {
		$sql = "Exec Onegate_RecordGetSingle " . $v_record_id_get ;
		$ado_conn->SetFetchMode(ADODB_FETCH_ASSOC);
		$arr_single_record = $ado_conn->GetRow($sql); 
		$arr_single_record[C_RECEIVED_RECORD_XML_DATA] = stripslashes($arr_single_record[C_RECEIVED_RECORD_XML_DATA]);
		$arr_single_record[C_LICENSE_XML_DATA] = stripslashes($arr_single_record[C_LICENSE_XML_DATA]);
	}
	//--------------begin hieudt 081208-------------------------------------
	$sql = "Exec Onegate_RecordWorkGetAll_DatCQ_170908 ";
	$sql = $sql ."'". $v_record_id_list."'" ;
	$ado_conn->SetFetchMode(ADODB_FETCH_ASSOC);
	$arr_record_work_hieudt = $ado_conn->GetAll($sql);	
	$v_work_last=sizeof($arr_record_work_hieudt)-1;
	$v_single_work_last=$arr_record_work_hieudt[$v_work_last];
	$v_ma = $v_single_work_last['FK_WORKER'];
	//var_dump($v_ma);
	//--------------end hieudt 081208-------------------------------------
	
}
?>



